package com.wudi.estate.service.impl.ownermanagement;

import com.wudi.estate.bean.ownermanagement.Vehicle;
import com.wudi.estate.mapper.ownermanagement.VehicleMapper;
import com.wudi.estate.service.ownermanagement.VehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VehicleServiceImpl implements VehicleService {
    @Autowired
    private VehicleMapper vehicleMapper;
    @Override
    public List<Vehicle> selectAll() throws Exception {
        return vehicleMapper.selectAll();
    }

    @Override
    public Vehicle selectById(Vehicle v) throws Exception {
        return vehicleMapper.selectById(v);
    }

    @Override
    public void insert(Vehicle v) throws Exception {
        vehicleMapper.insert(v);
    }

    @Override
    public void prohibit(Vehicle v) throws Exception {
        vehicleMapper.prohibit(v);
    }

    @Override
    public void updateById(Vehicle v) throws Exception {
        vehicleMapper.updateById(v);
    }

    @Override
    public List<Vehicle> selectByName(String vcard) throws Exception {
        return vehicleMapper.selectByName(vcard);
    }

}
